/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('ims_crl_tpshop_shop_config', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    uniacid: {
      type: DataTypes.INTEGER(11),
      allowNull: false
    },
    shop_name: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    buy_tpl_id: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    deli_tpl_id: {
      type: DataTypes.STRING(100),
      allowNull: true
    },
    ali_sms_akid: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    ali_sms_aksecret: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    ali_sms_signname: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    ali_sms_tplcode: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    ali_sms_var_name: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    shop_phone: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    location: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    after_sale: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    kdniao_mch_id: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    kdniao_api_key: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    integral_model: {
      type: DataTypes.INTEGER(4),
      allowNull: false,
      defaultValue: '1'
    },
    integral: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    cert_pem: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    key_pem: {
      type: DataTypes.TEXT,
      allowNull: true
    },
    shop_color: {
      type: DataTypes.STRING(32),
      allowNull: true,
      defaultValue: ''
    },
    create_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    update_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    delete_time: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: '0'
    },
    official_account_on: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      defaultValue: '0'
    }
  }, {
    tableName: 'ims_crl_tpshop_shop_config'
  });

  Model.associate = function() {

  }

  return Model;
};
